(1) Input format
----------------

The graph must be provided in a file having the
following format:

------------------------------------------------------------------------------
number of vertices
number of elements in X
number of edges
list of vertices that correspond to an element in X (each on a separate line)
list of edges (each on a separate line) 
------------------------------------------------------------------------------

The vertices are just the numbers 1,2,3,...,"number of vertices".
An edge is given by its end points and its length:
"1st end point" "2nd endpoint" "length"

Example:
6
4
5
1
2
5
6
1 3 1
2 3 2
3 4 3
4 5 1
4 6 2

(This is the file "example01-graph.dat" from the
folder "examples".)


(2) Creating a MIP in CPLEX-format
----------------------------------

To create a description of the MIP in CPLEX-format 
type (using the example mentioned in (1)):

java CreateMIP examples/example01-graph.dat examples/example01-mip.dat

The program expects two filenames:
* The file containing the input realization.
* The name of a file where the description of the
  MIP is stored.


(3) Solving the MIP
-------------------

In principle, any MIP-solver could be used. To use
the freely available solver "glpsol" from the
GLPK type:

glpsol --cpxlp examples/example01-mip.dat -w examples/example01-sol.dat

The first file is just the output of CreateMIP.
The solution is written to the second file (in
a format specific to "glpsol").


(4) Extracting the edges of the solution
----------------------------------------

In case "glpsol" was used to solve the MIP,
the edges of an optimal sub-realization can be
extracted from the list of all edges in the
given realization by typing:

java ExtractEdges examples/example01-graph.dat examples/example01-sol.dat examples/example01-edges.dat

This program expects three filenames:
* The input realization
* The output of "glpsol".
* The name of a file where the edges of an
  optimal sub-realization are stored. The first line
  of this file also provides the total 
  length of this realization.
